package com.example.shop_2302.adapter

import com.chad.library.adapter.base.BaseQuickAdapter
import com.chad.library.adapter.base.viewholder.BaseViewHolder
import com.example.base.entity.QuanEntityItem
import com.example.shop_2302.R

class QuanAdapter:BaseQuickAdapter<QuanEntityItem,BaseViewHolder>(R.layout.item_quan) {
    override fun convert(holder: BaseViewHolder, item: QuanEntityItem) {
        holder.setText(R.id.quan_money,"￥${item.money}")
        holder.setText(R.id.quan_minMoney,"满${item.minPrice}元可用")
        if(item.isUse){
            //true 代表：已领取 但还未使用
            holder.setText(R.id.quan_status,"已领取")
        }else{
            holder.setText(R.id.quan_status,"领取")
        }
    }
}